package ${packageName}

import nancal.mp.db.*
import nancal.mp.db.enums.*
import nbcp.base.db.annotation.*
import nbcp.myoql.db.*
import nbcp.myoql.db.sql.annotation.*
import nbcp.myoql.db.sql.base.*
import nbcp.myoql.db.sql.define.*
import java.time.*
import java.io.*

<#list entities as entity>
/**
* ${entity.getComment()}
* @author ${author}
*/
@DbEntityGroup("${group}")
@Cn("${entity.getComment()}")
<#list entity.getColumns() as field>
<#if field.isPrimary()>
@DbEntityIndex("${field.getName()}", unique = true)
</#if>
</#list>
<#if entity.getAutoId()>
@AutoIdColumn
<#elseif entity.getAutoNumber()>
@AutoNumberColumn
<#elseif entity.getAutoInc()>
@SqlAutoIncrementKey
</#if>
@DbName("${entity.getName()}")
open class ${entity.getClassName()}(): ${entity.getBaseType()} {
<#list entity.getDefineColumns() as field>
    /**
    * ${field.getComment()}
    */
    @Cn("${field.getComment()}")
    @DbName("${field.getName()}")
    var ${field.getFieldName()}: ${field.getKotlinType()} = ${field.getKotlinDefaultValue()}
</#list>
}
</#list>